package com.tianfeng.fenghuotoutiao.ui.activity.AppListActibity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;


import com.tianfeng.fenghuotoutiao.R;
import com.tianfeng.fenghuotoutiao.ui.activity.WebHelperActivity;
import com.tianfeng.fenghuotoutiao.ui.activity.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

public class appActivity extends BaseActivity implements View.OnClickListener {
  String id;
    @BindView(R.id.imageView19)
    ImageView imageView19;
    @BindView(R.id.tabLayout)
    TabLayout tabLayout;
    @BindView(R.id.viewPager)
    ViewPager viewPager;
    private List<Fragment> list=new ArrayList<>();
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

    }

    @Override
    protected void initView(View rootView, Bundle savedInstanceState) {

        id=getIntent().getStringExtra("id");
        imageView19.setOnClickListener(this);
        list.add(new OneFragment());
        list.add(new TwoFragment());

        /*设置Adapter*/
        viewPager.setAdapter(new MyOrderPagerAdapter(getSupportFragmentManager(), list));
        /*Tab与ViewPager绑定*/
        tabLayout.setupWithViewPager(viewPager);
        imageView19.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }
    @Override
    public int getContentLayout() {
        return R.layout.activity_app;
    }

    @Override
    public void onClick(View view) {

    }
}
